package cn.xiongxf.feign;

import cn.xiongxf.doc.CourseDoc;
import cn.xiongxf.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search",fallbackFactory = ESFeignClientFallbackFactory.class)
public interface ESFeignClient {

    //                    记得加类上的路径
    @PostMapping("/es/course/save")
    JsonResult saveCourseDoc(@RequestBody CourseDoc doc);

    @GetMapping("/es/course/delete/{id}")
    JsonResult deleteCourseDoc(@PathVariable Long id);
}
